export default {
  addCounter(state, payload) {
    payload.count += 1
  },
  addToCart(state, payload) {
    // 当一个商品加入到购物车的时候，默认将它选中
    payload.checked = true
    state.cartList.push(payload)
  }
}